The present invention relates to video compression and, more particularly, to improving video compression quality.
Although the Joint Photographic Experts Group (JPEG) compression standard is very effective at compressing streaming still images, further compression can be achieved using the Motion Picture Experts Group (MPEG) video standard. MPEG augments JPEG with motion compensation, a form of differential encoding, and achieves compression ratios as high as 200 to 1. In MPEG, each frame in a video sequence is encoded. There are three kinds of MPEG video frames: intra (I), predictive (P), and bi-directional predicted (B). I-frames are independent of other frames, and their encoding is almost identical to JPEG. I-frames are encoded using information entirely within the frame-to-be compressed. P-frames are encoded using information both from within the frame-to-be compressed and from the previous I or P-frame. Compression is about 10 times better than for I-frames, but the performance costs are high. B-frames are encoded using information from within the frame, from the previous I or P-frame, and from the following I or P-frame. B-frames generally are compressed to about one sixtieth the size of I-frames, but performance suffers even further. B-frames are never used as a basis for the encoding of other frames. The time it takes to decode each of the three frame types is roughly the same.
Traditional video frame compression works great for talking heads. However, when the motion within a video becomes more dynamic the I-frame interval must be decreased in order to accommodate the higher motion. By decreasing the I-frame interval, the P and B-frames are based on more recently produced I-frames. Presently, adjusting the I-frame rate or interval is a time consuming trial and error, manually-performed process. The video compression in effect is less efficient, thereby making it more costly. Therefore, there exists a need for improving video compression by improving the ability to adjust I-frame rate.
The present invention provides a computer processor implemented video compression method and computer program product for compressing a video signal. The method determines a video motion value from the video signal, determines frame interval according to the determined video motion value, and compresses at least a portion of the video signal according to the determined frame interval.
In accordance with further aspects of the invention, determining a video motion value includes taking a sample of a frame of the video signal, comparing the sample to one or more previously taken samples, and determining the video motion value according to the comparison.
In accordance with other aspects of the invention, the steps of the process are repeated for frames of the video signal in accordance with a sampling pattern, such as every frame of the video signal.
In accordance with still further aspects of the invention, determining frame interval further includes comparing the determined video motion value to one or more previously determined video motion values. If the determined video motion value differs from the one or more previously determined video motion values by a threshold amount, the method determines frame interval according to the determined video motion value.
In accordance with yet other aspects of the invention, compressing at least a portion of the video signal according to the determined frame interval further includes comparing the frame interval to one or more previously determined frame intervals. If the determined frame interval differs from the one or more previously determined frame intervals by a threshold amount, the method compresses at least a portion of the video signal according to the determined frame interval.
In accordance with still other aspects of the invention, the frame interval is a predictive frame interval or a bi-directional predictive frame interval.
In accordance with further aspects of the invention, compressing at least a portion of the video signal uses at least one of the MPEG compression schemes.